In [1]:
import sys
import numpy as np
import pandas as pd
import seaborn as sns
sns.set_theme()
In [2]:
results_folder = 'mmvec_major_taxa_scrambled_2'
results_base_name = 'latent_dim_3_input_prior_1.00_output_prior_1.00_beta1_0.90_beta2_0.95'
In [3]:
table = pd.read_table(results_folder + '/' + results_base_name + '_ranks.txt', index_col=0)
table.head()
Out[3]:
Propionibacteriaceae Staphylococcus caprae or capitis Staphylococcus epidermidis Staphylococcus hominis Other Staphylococci Polyomavirus HPyV6 Polyomavirus HPyV7 Merkel Cell Polyomavirus Malasseziaceae Corynebacteriaceae Micrococcaceae Other families
featureid
X940001 0.184421 0.053692 0.153110 0.199588 -0.032911 -0.020608 -0.037587 0.110812 0.084744 -0.016153 0.145283 -0.061960
X940002 -0.070998 -0.077200 -0.037909 -0.008117 -0.079228 -0.080866 -0.150118 -0.134636 -0.085292 -0.077377 -0.008113 -0.081268
X940005 -0.020409 -0.113338 -0.017493 -0.000518 -0.116096 -0.107599 -0.377870 -0.157181 -0.151141 -0.094980 0.057534 -0.135563
X940007 0.095343 0.247376 0.343342 0.376841 0.278461 0.203163 0.406508 0.115586 0.326311 0.269885 0.322992 0.287431
X940010 1.102840 0.815784 -0.069650 0.356785 0.513313 1.011083 0.652279 0.737868 0.371052 0.363324 0.048634 0.631470
In [4]:
table['Selected'] = np.isin(table.index,
                            ['X940203', 'X940589', 'X940625', 'X940925', 'X940936', 'X942191',
                             'X942237', 'X950023', 'X950028', 'X950056', 'X950157', 'X950173',
                             'X950193', 'X950225', 'X950228', 'X950233', 'X950254', 'X950396',
                             'X950485', 'X950584', 'X950661', 'X950999', 'X960035', 'X960242',
                             'X960306', 'X960421', 'X960463', 'X960465', 'X960712', 'X960726',
                             'X960934', 'X961553', 'X961686', 'X970018', 'X970091', 'X970092',
                             'X970232', 'X970283', 'X970327', 'X970342', 'X970633', 'X970680']
                           )
table.sort_values('Selected', inplace=True)
sns.relplot(
    table,
    y='Propionibacteriaceae', x='Staphylococcus epidermidis', hue='Selected'
)
Out[4]:
<seaborn.axisgrid.FacetGrid at 0x7f478b89b3d0>
In [5]:
sns.pairplot(table, hue='Selected')
Out[5]:
<seaborn.axisgrid.PairGrid at 0x7f478b40dbd0>
In [6]:
for i in table.columns[:-1]:
    sns.displot(table, x=i, hue='Selected', multiple='stack')